package com.zlsy.springbootdemo.decorator.rookietutorial;

/**
 * @author zhouliang
 * @date 2020/6/4 9:47
 */
public abstract class ShapeDecorator implements Shape {
    /**
     * 创建一个实现了 Shape 接口的抽象装饰类 ShapeDecorator，并把 Shape 对象作为它的实例变量。
     */
    protected Shape decoratedShape;

    /**
     * 放入各种画画的动作
     *
     */
    public ShapeDecorator(Shape decoratedShape) {
        this.decoratedShape = decoratedShape;
    }

    @Override
    public void draw() {
        decoratedShape.draw();
    }
}
